package com.zimmor;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author:zimmor
 * @Date: 2021/3/11 9:46
 * @Description
 * @version: 1.0.0
 */
@Component
@RabbitListener(queues = "itheima")//这里只绑定队列
public class Customer2 {
    @RabbitHandler//此注释意味着可以下面无返回值的函数的参数即为监听到的消息
    public void  getMessage(String message) {
        System.out.println("itheima"+message+"+++++++++++++++");

    }
}
